package com.wkhyapp.lm.contract;

import com.wkhyapp.lm.base.BasePresenter;
import com.wkhyapp.lm.http.ApiCallback;
import com.wkhyapp.lm.http.net.BaseRequest;
import com.wkhyapp.lm.http.net.FansListRequest;
import com.wkhyapp.lm.http.net.SuperResponse;
import com.wkhyapp.lm.http.vo.Goods;
import com.wkhyapp.lm.http.vo.Market;
import com.wkhyapp.lm.utils.MemberUtils;

/**
 * Created by fang on 2021/10/20.
 */

public class MarketPresenter extends BasePresenter<MarketView> {

    public MarketPresenter(MarketView marketView) {
        super(marketView);
    }

    public void getData(){
        BaseRequest request = new BaseRequest();
        request.setUserId(MemberUtils.getUid());
        addSubscription(apiStores.marketList(request),new ApiCallback<SuperResponse<Market>>() {
            @Override
            public void onSuccess(SuperResponse<Market> response) {
                mvpView.setMarket(response.getItems());
            }
            @Override
            public void onFailure(String msg) {
            }

            @Override
            public void onFinish() {
                mvpView.dismissLoad();
            }
        });

    }
}
